<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const count = ref(1);
        function ref(value){
            return new RefImpl(value)
        }
        //RefImpl构造函数
        class RefImpl{
            constructor(){
                if(isRef(value)) return value
                //创建一个存放依赖的数组
                this.dep = new Set([]);
                //判断value是否是一个对象
                if(typeof value === 'object'){
                    this.value = reactive(value)
                }else{
                    this.value = value
                }
            }
            get(){
                //如果读取就会收集依赖
            }
            set(){
                //如果重新设置就会通知依赖更新
            }
        }
    </script>
</body>
</html>